package lab02.Test05;

import com.sun.xml.internal.bind.v2.runtime.output.SAXOutput;

/**
 * Created by Administrator on 2017/10/13.
 */
public class Cube {
    //1.属性
    private double width;
    private double height;
    private double length;
    //2.方法
    public void setWidth(double width ){
        this.width = width;
    }
    public double getWidth(){
        return width;
    }
    public void setHeight(double height){
        this.height=height;
    }
    public double getHeight(){
        return height;
    }
    public void setLength(double length){
        this.length= length;
    }
    public double getLength(){
        return length;
    }
    public double capacity(double length,double width,double height){
        double capacity;
        capacity = length*width*height;
        return capacity;
    }
    //3.构造函数
    Cube(){
        System.out.print("立方体体积是");
    }
}
